Integrand size = 31, antiderivative size = 148 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x} \, dx=-\frac {B n \log \left (-\frac {h (a+b x)}{b g-a h}\right ) \log (g+h x)}{h}+\frac {B n \log \left (-\frac {h (c+d x)}{d g-c h}\right ) \log (g+h x)}{h}+\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \log (g+h x)}{h}-\frac {B n \operatorname {PolyLog}\left (2,\frac {b (g+h x)}{b g-a h}\right )}{h}+\frac {B n \operatorname {PolyLog}\left (2,\frac {d (g+h x)}{d g-c h}\right )}{h} \]
-B*n*ln(-h*(b*x+a)/(-a*h+b*g))*ln(h*x+g)/h+B*n*ln(-h*(d*x+c)/(-c*h+d*g))*l n(h*x+g)/h+(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))*ln(h*x+g)/h-B*n*polylog(2,b*( h*x+g)/(-a*h+b*g))/h+B*n*polylog(2,d*(h*x+g)/(-c*h+d*g))/h
Time = 0.07 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.01 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x} \, dx=\frac {\left (A+B \left (-n \log (a+b x)+n \log (c+d x)+\log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )\right ) \log (g+h x)+B n \left (\log (a+b x) \log \left (\frac {b (g+h x)}{b g-a h}\right )+\operatorname {PolyLog}\left (2,\frac {h (a+b x)}{-b g+a h}\right )\right )-B n \left (\log (c+d x) \log \left (\frac {d (g+h x)}{d g-c h}\right )+\operatorname {PolyLog}\left (2,\frac {h (c+d x)}{-d g+c h}\right )\right )}{h} \]
((A + B*(-(n*Log[a + b*x]) + n*Log[c + d*x] + Log[(e*(a + b*x)^n)/(c + d*x )^n]))*Log[g + h*x] + B*n*(Log[a + b*x]*Log[(b*(g + h*x))/(b*g - a*h)] + P olyLog[2, (h*(a + b*x))/(-(b*g) + a*h)]) - B*n*(Log[c + d*x]*Log[(d*(g + h *x))/(d*g - c*h)] + PolyLog[2, (h*(c + d*x))/(-(d*g) + c*h)]))/h
Time = 0.44 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.05, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {2946, 2841, 2840, 2838}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{g+h x} \, dx\) |
\(\Big \downarrow \) 2946 |
\(\displaystyle -\frac {b B n \int \frac {\log (g+h x)}{a+b x}dx}{h}+\frac {B d n \int \frac {\log (g+h x)}{c+d x}dx}{h}+\frac {\log (g+h x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{h}\) |
\(\Big \downarrow \) 2841 |
\(\displaystyle -\frac {b B n \left (\frac {\log (g+h x) \log \left (-\frac {h (a+b x)}{b g-a h}\right )}{b}-\frac {h \int \frac {\log \left (-\frac {h (a+b x)}{b g-a h}\right )}{g+h x}dx}{b}\right )}{h}+\frac {B d n \left (\frac {\log (g+h x) \log \left (-\frac {h (c+d x)}{d g-c h}\right )}{d}-\frac {h \int \frac {\log \left (-\frac {h (c+d x)}{d g-c h}\right )}{g+h x}dx}{d}\right )}{h}+\frac {\log (g+h x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{h}\) |
\(\Big \downarrow \) 2840 |
\(\displaystyle -\frac {b B n \left (\frac {\log (g+h x) \log \left (-\frac {h (a+b x)}{b g-a h}\right )}{b}-\frac {\int \frac {\log \left (1-\frac {b (g+h x)}{b g-a h}\right )}{g+h x}d(g+h x)}{b}\right )}{h}+\frac {B d n \left (\frac {\log (g+h x) \log \left (-\frac {h (c+d x)}{d g-c h}\right )}{d}-\frac {\int \frac {\log \left (1-\frac {d (g+h x)}{d g-c h}\right )}{g+h x}d(g+h x)}{d}\right )}{h}+\frac {\log (g+h x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{h}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {\log (g+h x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{h}-\frac {b B n \left (\frac {\operatorname {PolyLog}\left (2,\frac {b (g+h x)}{b g-a h}\right )}{b}+\frac {\log (g+h x) \log \left (-\frac {h (a+b x)}{b g-a h}\right )}{b}\right )}{h}+\frac {B d n \left (\frac {\operatorname {PolyLog}\left (2,\frac {d (g+h x)}{d g-c h}\right )}{d}+\frac {\log (g+h x) \log \left (-\frac {h (c+d x)}{d g-c h}\right )}{d}\right )}{h}\) |
((A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])*Log[g + h*x])/h - (b*B*n*((Log[- ((h*(a + b*x))/(b*g - a*h))]*Log[g + h*x])/b + PolyLog[2, (b*(g + h*x))/(b *g - a*h)]/b))/h + (B*d*n*((Log[-((h*(c + d*x))/(d*g - c*h))]*Log[g + h*x] )/d + PolyLog[2, (d*(g + h*x))/(d*g - c*h)]/d))/h
3.3.98.3.1 Defintions of rubi rules used
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_ Symbol] :> Simp[1/g Subst[Int[(a + b*Log[1 + c*e*(x/g)])/x, x], x, f + g* x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g + c *(e*f - d*g), 0]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_ )), x_Symbol] :> Simp[Log[e*((f + g*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x )^n])/g), x] - Simp[b*e*(n/g) Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d + e*x ), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ )]*(B_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[f + g*x]*((A + B*Log[ e*((a + b*x)^n/(c + d*x)^n)])/g), x] + (-Simp[b*B*(n/g) Int[Log[f + g*x]/ (a + b*x), x], x] + Simp[B*d*(n/g) Int[Log[f + g*x]/(c + d*x), x], x]) /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && EqQ[n + mn, 0] && NeQ[b*c - a* d, 0]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 2.52 (sec) , antiderivative size = 521, normalized size of antiderivative = 3.52
method | result | size |
risch | \(\frac {\left (-i B \pi \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )+i B \pi \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}-i B \pi \,\operatorname {csgn}\left (i \left (b x +a \right )^{n}\right ) \operatorname {csgn}\left (i \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )+i B \pi \,\operatorname {csgn}\left (i \left (b x +a \right )^{n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}+i B \pi \,\operatorname {csgn}\left (i \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}-i B \pi \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{3}+i B \pi \,\operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}-i B \pi \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{3}+2 B \ln \left (e \right )+2 A \right ) \ln \left (h x +g \right )}{2 h}+\frac {B \ln \left (\left (b x +a \right )^{n}\right ) \ln \left (h x +g \right )}{h}-\frac {B n \operatorname {dilog}\left (\frac {\left (h x +g \right ) b +a h -b g}{a h -b g}\right )}{h}-\frac {B n \ln \left (h x +g \right ) \ln \left (\frac {\left (h x +g \right ) b +a h -b g}{a h -b g}\right )}{h}-\frac {B \ln \left (\left (d x +c \right )^{n}\right ) \ln \left (h x +g \right )}{h}+\frac {B n \operatorname {dilog}\left (\frac {d \left (h x +g \right )+c h -d g}{c h -d g}\right )}{h}+\frac {B n \ln \left (h x +g \right ) \ln \left (\frac {d \left (h x +g \right )+c h -d g}{c h -d g}\right )}{h}\) | \(521\) |
1/2*(-I*B*Pi*csgn(I*e)*csgn(I*(b*x+a)^n/((d*x+c)^n))*csgn(I*e/((d*x+c)^n)* (b*x+a)^n)+I*B*Pi*csgn(I*e)*csgn(I*e/((d*x+c)^n)*(b*x+a)^n)^2-I*B*Pi*csgn( I*(b*x+a)^n)*csgn(I/((d*x+c)^n))*csgn(I*(b*x+a)^n/((d*x+c)^n))+I*B*Pi*csgn (I*(b*x+a)^n)*csgn(I*(b*x+a)^n/((d*x+c)^n))^2+I*B*Pi*csgn(I/((d*x+c)^n))*c sgn(I*(b*x+a)^n/((d*x+c)^n))^2-I*B*Pi*csgn(I*(b*x+a)^n/((d*x+c)^n))^3+I*B* Pi*csgn(I*(b*x+a)^n/((d*x+c)^n))*csgn(I*e/((d*x+c)^n)*(b*x+a)^n)^2-I*B*Pi* csgn(I*e/((d*x+c)^n)*(b*x+a)^n)^3+2*B*ln(e)+2*A)*ln(h*x+g)/h+B*ln((b*x+a)^ n)*ln(h*x+g)/h-B/h*n*dilog(((h*x+g)*b+a*h-b*g)/(a*h-b*g))-B/h*n*ln(h*x+g)* ln(((h*x+g)*b+a*h-b*g)/(a*h-b*g))-B*ln((d*x+c)^n)*ln(h*x+g)/h+B/h*n*dilog( (d*(h*x+g)+c*h-d*g)/(c*h-d*g))+B/h*n*ln(h*x+g)*ln((d*(h*x+g)+c*h-d*g)/(c*h -d*g))
\[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x} \, dx=\int { \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{h x + g} \,d x } \]
Exception generated. \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x} \, dx=\text {Exception raised: HeuristicGCDFailed} \]
\[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x} \, dx=\int { \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{h x + g} \,d x } \]
-B*integrate(-(log((b*x + a)^n) - log((d*x + c)^n) + log(e))/(h*x + g), x) + A*log(h*x + g)/h
\[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x} \, dx=\int { \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{h x + g} \,d x } \]
Timed out. \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x} \, dx=\int \frac {A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{g+h\,x} \,d x \]